// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_BPT_BLUEPRINT
// * CreateDate    : 2014-06-05 18:29:41
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:29:41
// * LastChanger   : 2014-06-05 18:29:41
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class BptBlueprintEntity : EntityBase
    {
        public BptBlueprintTable TableSchema
        {
            get
            {
                return BptBlueprintTable.Current;
            }
		}
		
		public BptBlueprintEntity()
        {

        }
		
		public BptBlueprintEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.BlueprintId = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_ID"]));
			this.ParentId = Convert.ToString(CommonFunctions.ToObject(dr["PARENT_ID"]));
			this.BptTaskId = Convert.ToString(CommonFunctions.ToObject(dr["BPT_TASK_ID"]));
			this.BlueprintCode = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_CODE"]));
			this.BlueprintType = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_TYPE"]));
			this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
			this.MaterialId = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_ID"]));
			this.MaterialQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["MATERIAL_QTY"]));
			this.Sequence = Convert.ToDecimal(CommonFunctions.ToObject(dr["SEQUENCE"]));
			this.BlueprintName = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_NAME"]));
			this.FileName = Convert.ToString(CommonFunctions.ToObject(dr["FILE_NAME"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.DeletefLag = Convert.ToInt32(CommonFunctions.ToObject(dr["DELETEF_LAG"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }
		
		public BptBlueprintEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.BlueprintId = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_ID"]));
			this.ParentId = Convert.ToString(CommonFunctions.ToObject(dr["PARENT_ID"]));
			this.BptTaskId = Convert.ToString(CommonFunctions.ToObject(dr["BPT_TASK_ID"]));
			this.BlueprintCode = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_CODE"]));
			this.BlueprintType = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_TYPE"]));
			this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
			this.MaterialId = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_ID"]));
			this.MaterialQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["MATERIAL_QTY"]));
			this.Sequence = Convert.ToDecimal(CommonFunctions.ToObject(dr["SEQUENCE"]));
			this.BlueprintName = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_NAME"]));
			this.FileName = Convert.ToString(CommonFunctions.ToObject(dr["FILE_NAME"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.DeletefLag = Convert.ToInt32(CommonFunctions.ToObject(dr["DELETEF_LAG"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return BptBlueprintTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string BlueprintId
        {
            get { return Convert.ToString(GetData(BptBlueprintTable.C_BLUEPRINT_ID)); }
            set { SetData(BptBlueprintTable.C_BLUEPRINT_ID, value); }
        }
		
        [DataMember]
        public string ParentId
        {
            get { return Convert.ToString(GetData(BptBlueprintTable.C_PARENT_ID)); }
            set { SetData(BptBlueprintTable.C_PARENT_ID, value); }
        }
		
        [DataMember]
        public string BptTaskId
        {
            get { return Convert.ToString(GetData(BptBlueprintTable.C_BPT_TASK_ID)); }
            set { SetData(BptBlueprintTable.C_BPT_TASK_ID, value); }
        }
		
        [DataMember]
        public string BlueprintCode
        {
            get { return Convert.ToString(GetData(BptBlueprintTable.C_BLUEPRINT_CODE)); }
            set { SetData(BptBlueprintTable.C_BLUEPRINT_CODE, value); }
        }
		
        [DataMember]
        public string BlueprintType
        {
            get { return Convert.ToString(GetData(BptBlueprintTable.C_BLUEPRINT_TYPE)); }
            set { SetData(BptBlueprintTable.C_BLUEPRINT_TYPE, value); }
        }
		
        [DataMember]
        public string ProductId
        {
            get { return Convert.ToString(GetData(BptBlueprintTable.C_PRODUCT_ID)); }
            set { SetData(BptBlueprintTable.C_PRODUCT_ID, value); }
        }
		
        [DataMember]
        public string MaterialId
        {
            get { return Convert.ToString(GetData(BptBlueprintTable.C_MATERIAL_ID)); }
            set { SetData(BptBlueprintTable.C_MATERIAL_ID, value); }
        }
		
        [DataMember]
        public decimal MaterialQty
        {
            get { return Convert.ToDecimal(GetData(BptBlueprintTable.C_MATERIAL_QTY)); }
            set { SetData(BptBlueprintTable.C_MATERIAL_QTY, value); }
        }
		
        [DataMember]
        public decimal Sequence
        {
            get { return Convert.ToDecimal(GetData(BptBlueprintTable.C_SEQUENCE)); }
            set { SetData(BptBlueprintTable.C_SEQUENCE, value); }
        }
		
        [DataMember]
        public string BlueprintName
        {
            get { return Convert.ToString(GetData(BptBlueprintTable.C_BLUEPRINT_NAME)); }
            set { SetData(BptBlueprintTable.C_BLUEPRINT_NAME, value); }
        }
		
        [DataMember]
        public string FileName
        {
            get { return Convert.ToString(GetData(BptBlueprintTable.C_FILE_NAME)); }
            set { SetData(BptBlueprintTable.C_FILE_NAME, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(BptBlueprintTable.C_CREATED_BY)); }
            set { SetData(BptBlueprintTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(BptBlueprintTable.C_CREATED_DATE)); }
            set { SetData(BptBlueprintTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(BptBlueprintTable.C_UPDATED_BY)); }
            set { SetData(BptBlueprintTable.C_UPDATED_BY, value); }
        }
		
        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(BptBlueprintTable.C_UPDATED_DATE)); }
            set { SetData(BptBlueprintTable.C_UPDATED_DATE, value); }
        }
		
        [DataMember]
        public int DeletefLag
        {
            get { return Convert.ToInt32(GetData(BptBlueprintTable.C_DELETEF_LAG)); }
            set { SetData(BptBlueprintTable.C_DELETEF_LAG, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(BptBlueprintTable.C_REMARK)); }
            set { SetData(BptBlueprintTable.C_REMARK, value); }
        }
		
		#endregion
	}
	
	
}	

